import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F


class TestNet(nn.Module):
    def __init__(self):
        super(TestNet, self).__init__()
        self.op = nn.ConvTranspose1d(3, 64, 4, bias=True)

    def forward(self, x):
        out = self.op(x)
        return [out]


if __name__ == "__main__":
    net = TestNet()

    x = np.ones([1, 3, 50]).astype(np.float32)
    x = torch.FloatTensor(x)
    print(x)
    result = net(x)
    print(result[0])
    print(result[0].mean())
    print(result[0].shape)


